package com.utils;

import android.content.Context;
import android.util.Log;

import androidx.core.content.FileProvider;

/**
 * @describe
 * @author: lixiaopeng
 * @Date: 2019-05-22
 */
public final class Utils extends FileProvider {

    private static Context context;
    private static boolean isDebug = BuildConfig.DEBUG;

    /**
     * 权限请求时使用的请求码
     */

    private static int CODE_PERMISSION_REQUEST = 1;

    @Override
    public boolean onCreate() {
        context = getContext();
        LogUtils.init(isDebug);
        return super.onCreate();
    }

    public static Context getApp() {
        return context;
    }

    public static boolean isDebug() {
        return isDebug;
    }

    public static void setPermissionRequestCode(int code) {
        CODE_PERMISSION_REQUEST = code;
    }

    public static int getPermissionRequestCode(){
        return CODE_PERMISSION_REQUEST;
    }

}
